import { post } from '@/utils/request'

// 从企业微信同步部门列表
export const syncDepartmentListFromWx = p => post(`/service-cop/b/contact/v1/syncDepartmentList`, p)
// 查询部门列表
export const getDepartmentList = p => post(`/service-cop/b/contact/v1/departmentList`, p)
// 查询部门列表树
export const getDepartmentTreeList = p => post(`/service-cop/b/contact/v1/departmentTreeList/${p.parentId}`, p)
// 查询部门+员工列表树
export const getDepartmentUnionEmployeeTreeList = p => post(`/service-cop/b/contact/v1/listAllDepartmentUnionEmployee/${p.parentId}`, p)

// 从企业微信同步部门员工
export const syncEmployeeListFromWx = p => post(`/service-cop/b/contact/v1/syncEmployeeList/${p.departmentId}`, p)
// 查询部门员工列表
export const getEmployeeList = p => post(`/service-cop/b/contact/v1/employeelist`, p)
// 查询部门员工分页列表
export const getEmployeePageList = p => post(`/service-cop/b/contact/v1/employeePageList`, p)
// 查询部门员工分页列表
export const getEmployeeWithSubPageList = p => post(`/service-cop/b/contact/v1/employeeWithSubPageList`, p)
// 查询部门员工详情
export const viewEmployee = p => post(`/service-cop/b/contact/v1/view/${p.id}`, p, 'get')
